<layout name="page" />
<block name="content">
	{:widget('page_header/simple',array('name'=>'查看客户'))}
	{:widget('page_header/sub',array('name'=>'客户信息'))}
	<div class="frame">
		<input type="hidden" name="id" id="id" disabled="disabled" value="{$vo.id}">
		<div class="frame">
			<div class="box col-12">
				
					<label class="input-label" for="address">产品：</label>
					
						<input class="input" type="text" id="product" disabled="disabled" value="{$vo.product}">
					</div>
				</div>
			</div>
			<div class="box col-12">
				
					<label class="input-label" for="name">姓名*：</label>
					
						<input class="input" type="text" id="name" disabled="disabled" value="{$vo.name}">
					</div>
				</div>
			</div>
		</div>
		<div class="frame">
			<div class="box col-12">
				
					<label class="input-label" for="salesman">业务员：</label>
					
						<input type="text" class="input" disabled="disabled" value="{$vo.salesman_name}" id="salesman">
					</div>
				</div>
			</div>
			<div class="box col-12">
				
					<label class="input-label" for="company">公司：</label>
					
						<input type="text" class="input"  id="company_name" disabled="disabled" value="{$vo.company_name}">
					</div>
				</div>
			</div>
		</div>
		<div class="frame">
			<div class="box col-12">
				
					<label class="input-label" for="dept">部门：</label>
					
						<input class="input" type="text" id="dept"  name="dept"  disabled="disabled" value="{$vo.dept}">
					</div>
				</div>
			</div>
			<div class="box col-12">
				
					<label class="input-label" for="position">职位：</label>
					
						<input class="input" type="text" id="position" name="position"  disabled="disabled" value="{$vo.position}">
					</div>
				</div>
			</div>
		</div>
		<div class="frame">
			<div class="box col-12">
				
					<label class="input-label" for="office_tel">办公电话*：</label>
					
						<input class="input" type="text" id="office_tel" name="office_tel" disabled="disabled"
						value="{$vo.office_tel}" check="required" info="请输入办公电话">
					</div>
				</div>
			</div>
			<div class="box col-12">
				
					<label class="input-label" for="mobile_tel">手机：</label>
					
						<input class="input" type="text" id="mobile_tel" disabled="disabled" value="{$vo.mobile_tel}"
						name="mobile_tel">
					</div>
				</div>
			</div>
		</div>
		<div class="frame">
			<div class="box col-12">
				
					<label class="input-label" for="email">邮件*：</label>
					
						<input class="input" type="text" id="email" name="email" disabled="disabled" value="{$vo.email}"
						check="required" info="请输入邮件">
					</div>
				</div>
			</div>
			<div class="box col-12">
				
					<label class="input-label" for="im">即时聊天：</label>
					
						<input class="input" type="text" id="im" name="im" disabled="disabled" value="{$vo.im}">
					</div>
				</div>
			</div>
		</div>
		<div class="frame">
			<volist name="field_list " id="field_vo">
				{:widget('UserDefineField/view',array($field_vo))}
			</foreach>
		</div>
		<div class="frame">
			<div class="box col-12">
				
					<label class="input-label" for="remark">其他：</label>
					
						<textarea class="textarea" disabled="disabled" name="remark" rows="5"
				class="col-xs-12">{$vo.remark}</textarea>
					</div>
				</div>
			</div>
			<div class="box col-12">
				
					<label class="input-label" for="im">与谁共享：</label>
					
						<div class="input-static">
							<volist name="share_list" id="li">
								{$li};&nbsp;
							</foreach>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
	{:widget('page_header/sub',array('name'=>'客户跟进'))}
	<div class="ul-table ul-table_responsive border-bottom">
		<ul>
			<li class="thead hidden_xs">
				<span class="col-8 ">方式</span>
				<span class="col-12 ">时间</span>
				<span class="col-8 ">跟进人</span>
				<span class="col-20 x1">内容</span>
				<span class="col-16">下载</span>
			</li>
			<if condition="!empty($list)">
				<li class="no-data">
					没找到数据
				</li>
				<else/>
				<volist name="list" id="li">
					<li class="tbody">
						<span class="col-8 " title="{$li.visit_type}">{$li.visit_type}&nbsp;</span>
						<span class="col-12">{$li.create_time|to_date='Y-m-d H:i'}&nbsp;</span>
						<span class="col-8" title="{$li.user_name}">{$li.user_name}&nbsp;</span>
						<span class="col-20 x1">{$li.content}&nbsp;</span>
						<span class="col-16">{:widget('file_upload/link',array('add_file'=>$li['add_file']))}&nbsp;</span>
					</li>
				</foreach>
			</if>
		</ul>
	</div>
	<a name="add_follow"></a>
	{:widget('page_header/sub',array('name'=>'添加客户跟进'))}
	<div class="frame">
		<form method='post' id="form_data" name="form_data" enctype="multipart/form-data"   >
			<input type="hidden" id="contact_id" name="contact_id" value="{$vo.id}"/>
			
				<label class="input-label" for="visit_type">拜访方式：</label>
				
					<input class="input" type="text"  id="visit_type" name="visit_type" value="" check="required" info="请输入方式"/>
				</div>
			</div>
			
				<label class="input-label" for="content">拜访结果：</label>
				
					<textarea class="textarea" id="content" name="content" check="required" info="请输入拜访结果" ></textarea>
				</div>
			</div>
			
				<label class="input-label" for="name">附件：</label>
				
					{:widget('file_upload/add')}
				</div>
			</div>
			
				<label class="ayui-form-label" for="name"></label>
				
					<a class="btn btn-return"onclick="go_return_url();">取消</a>
				</div>
			</div>
		</form>
	</div>
</block>
<block name="js">
	<script type="text/javascript">
		layui.use(['global', 'editor'], function() {
			var $ = layui.jquery;

			$('#btn_save').on('click', function() {
				send_form("form_data", "{:url('add_activity_save')}", '', function(ret) {
					if (ret.status) {
						layer.msg(ret.info);
						location.href = "{:url('index')}";
					} else {
						layer.msg(ret.info);
						return false;
					}
				});
			});
		});
	</script>
</block>